package com.copyctrl.consumer.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author:JH
 * @version:1.0
 */
@Configuration
public class RabbitConfig {
    /**
     * 声明交换机
     * @return
     */
    @Bean
    public DirectExchange directDataExchange(){
        return new DirectExchange("direct.data.exchange",true,false);
    }

    /**
     * 处理redis信息的队列
     * @return
     */
    @Bean
    public Queue redisQueue(){
        return new Queue("redis.queue",true);
    }

    /**
     * 处理mysql信息的队列
     * @return
     */
    @Bean
    public Queue mysqlQueue(){
        return new Queue("mysql.queue",true);
    }

    /**
     * 处理删除图片的队列
     */
    @Bean
    public Queue fileQueue(){
        return new Queue("file.queue",true);
    }
}
